home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / HyperCard / Education / trigHype™ / card_2174.txt < prev    next >
Encoding:
Text File  |  1991-03-17  |  4.4 KB  |  214 lines

  1. -- card: 2174 from stack: in
  2. -- bmap block id: 2424
  3. -- flags: 4000
  4. -- background id: 7184
  5. -- name: A,B,a known
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   set numberFormat to <0.000000>
  9.  
  10.   --Calculate Sin A
  11.   get sin(card field "angle A"*(pi/180))
  12.   put it into card field "sin A"
  13.  
  14.   --Calculate Sin B
  15.   get sin(card field "angle B"*(pi/180))
  16.   put it into card field "sin B"
  17.  
  18.   --Calculate Sin C
  19.   get sin(card field "angle C"*(pi/180))
  20.   put it into card field "sin C"
  21.  
  22.   --Calculate Angle C
  23.   get 180-(card field "angle A"+card field "angle B")
  24.   put it into card field "angle C"
  25.  
  26.   --Calculate Side b
  27.   get (card field "side a"*card field "sin B")/card field "sin A"
  28.   put it into card field "side b"
  29.  
  30.   --Calculate Side c
  31.   get (card field "side a"*card field "sin C")/card field "sin A"
  32.   put it into card field "side c"
  33.  
  34.   --Calculate Area
  35.   get (card field "side a"+card field "side b"+card field "side c")/2
  36.   put it into mem9
  37.   get sqrt(mem9*(mem9-card field "side a")*(mem9-card field "side b") *(mem9-card field "side c"))
  38.   put it into bkgnd field "Area"
  39.  
  40.   --Calculate Perimeter
  41.   get card field "side a"+card field "side b"+card field "side c"
  42.   put it into bkgnd field "Perimeter"
  43. end mouseUp
  44.  
  45.  
  46. -- part 1 (field)
  47. -- low flags: 00
  48. -- high flags: 0002
  49. -- rect: left=305 top=146 right=163 bottom=433
  50. -- title width / last selected line: 0
  51. -- icon id / first selected line: 0 / 0
  52. -- text alignment: 1
  53. -- font id: 3
  54. -- text size: 12
  55. -- style flags: 0
  56. -- line height: 16
  57. -- part name: side a
  58.  
  59.  
  60. -- part 2 (field)
  61. -- low flags: 01
  62. -- high flags: 0004
  63. -- rect: left=299 top=215 right=234 bottom=427
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 0 / 0
  66. -- text alignment: 1
  67. -- font id: 3
  68. -- text size: 12
  69. -- style flags: 256
  70. -- line height: 16
  71. -- part name: angle C
  72.  
  73.  
  74. -- part 3 (field)
  75. -- low flags: 01
  76. -- high flags: 0004
  77. -- rect: left=112 top=263 right=282 bottom=240
  78. -- title width / last selected line: 0
  79. -- icon id / first selected line: 0 / 0
  80. -- text alignment: 1
  81. -- font id: 3
  82. -- text size: 12
  83. -- style flags: 256
  84. -- line height: 16
  85. -- part name: side b
  86.  
  87.  
  88. -- part 4 (field)
  89. -- low flags: 01
  90. -- high flags: 0004
  91. -- rect: left=51 top=135 right=154 bottom=184
  92. -- title width / last selected line: 0
  93. -- icon id / first selected line: 0 / 0
  94. -- text alignment: 1
  95. -- font id: 3
  96. -- text size: 12
  97. -- style flags: 256
  98. -- line height: 16
  99. -- part name: side c
  100.  
  101.  
  102. -- part 5 (field)
  103. -- low flags: 00
  104. -- high flags: 0002
  105. -- rect: left=22 top=217 right=234 bottom=150
  106. -- title width / last selected line: 0
  107. -- icon id / first selected line: 0 / 0
  108. -- text alignment: 1
  109. -- font id: 3
  110. -- text size: 12
  111. -- style flags: 0
  112. -- line height: 16
  113. -- part name: angle A
  114.  
  115.  
  116. -- part 6 (field)
  117. -- low flags: 00
  118. -- high flags: 0002
  119. -- rect: left=245 top=84 right=101 bottom=373
  120. -- title width / last selected line: 0
  121. -- icon id / first selected line: 0 / 0
  122. -- text alignment: 1
  123. -- font id: 3
  124. -- text size: 12
  125. -- style flags: 0
  126. -- line height: 16
  127. -- part name: angle B
  128.  
  129.  
  130. -- part 7 (field)
  131. -- low flags: 01
  132. -- high flags: 0001
  133. -- rect: left=422 top=50 right=62 bottom=482
  134. -- title width / last selected line: 0
  135. -- icon id / first selected line: 0 / 0
  136. -- text alignment: 0
  137. -- font id: 3
  138. -- text size: 9
  139. -- style flags: 0
  140. -- line height: 12
  141. -- part name: sin A
  142.  
  143.  
  144. -- part 8 (field)
  145. -- low flags: 01
  146. -- high flags: 0001
  147. -- rect: left=422 top=63 right=75 bottom=482
  148. -- title width / last selected line: 0
  149. -- icon id / first selected line: 0 / 0
  150. -- text alignment: 0
  151. -- font id: 3
  152. -- text size: 9
  153. -- style flags: 0
  154. -- line height: 12
  155. -- part name: sin B
  156.  
  157.  
  158. -- part 9 (field)
  159. -- low flags: 01
  160. -- high flags: 0001
  161. -- rect: left=422 top=76 right=88 bottom=482
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 0
  165. -- font id: 3
  166. -- text size: 9
  167. -- style flags: 0
  168. -- line height: 12
  169. -- part name: sin C
  170.  
  171.  
  172. -- part contents for card part 6
  173. ----- text -----
  174. 46.567463
  175.  
  176. -- part contents for card part 5
  177. ----- text -----
  178. 28.955024
  179.  
  180. -- part contents for card part 1
  181. ----- text -----
  182. 2
  183.  
  184. -- part contents for card part 7
  185. ----- text -----
  186. 0.484123
  187.  
  188. -- part contents for card part 8
  189. ----- text -----
  190. 0.726184
  191.  
  192. -- part contents for card part 9
  193. ----- text -----
  194. 0.968246
  195.  
  196. -- part contents for card part 2
  197. ----- text -----
  198. 104.477513
  199.  
  200. -- part contents for card part 3
  201. ----- text -----
  202. 2.999998
  203.  
  204. -- part contents for card part 4
  205. ----- text -----
  206. 4.000000
  207.  
  208. -- part contents for background part 3
  209. ----- text -----
  210. 8.999998
  211.  
  212. -- part contents for background part 5
  213. ----- text -----
  214. 2.904735